home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:fd="http://www.bradsoft.com/feeddemon/xmlns/1.0/">
-
- <xsl:output method="html"
- doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-
- $INCLUDE(commonvar.inc)$
-
- <fd:capabilities showExcerpts="false" toggleExcerpts="false" collapsePosts="false" itemGrouping="false" />
-
- <xsl:variable name="feed-type" select="newspaper/channel/@feedType"/>
-
- <xsl:variable name="img_link_new" select="'$IMAGEDIR$linknew.gif'"/>
- <xsl:variable name="img_flag_on" select="'$IMAGEDIR$star-on.png'"/>
- <xsl:variable name="img_flag_off" select="'$IMAGEDIR$star-off.png'"/>
- <xsl:variable name="img_enclosure" select="'$IMAGEDIR$enclosure.gif'"/>
- <xsl:variable name="img_permalink" select="'$IMAGEDIR$link.gif'"/>
- <xsl:variable name="img_newsbin" select="'$IMAGEDIR$newsbin.gif'"/>
-
- <xsl:variable name="lang_hdr_total" select="'$LANG_CONST(S_NewsHdrTotal)$'"/>
- <xsl:variable name="lang_hint_open_new" select="'$LANG_CONST(S_NewsHintOpenInNewTab)$'"/>
- <xsl:variable name="lang_hint_toggle_flag" select="'$LANG_CONST(S_NewsHintToggleFlag)$'"/>
- <xsl:variable name="lang_hint_addtonewsbin" select="'$LANG_CONST(S_NewsHintAddToNewsBin)$'"/>
-
- <xsl:variable name="common-head">
- $INCLUDE(metatrans.inc)$
- <style type="text/css">
- /*html { border: 1px solid purple; }*/
- $INCLUDE(commonstyles.css)$
-
- body {
- font-size: $FONT-SIZE-NEWSPAPER$;
- line-height: 1.6em;
- font-family: "$FONT-NAME-NEWSPAPER$", Verdana, Arial, sans-serif;
- margin: 0;
- margin-bottom: 12px;
- color: black;
- background-color: white;
- }
- a { color: purple; }
- a:hover { color: #CB00CC; }
- a.notcached {
- text-decoration: none ! important;
- border-bottom: 1px dotted red ! important;
- }
- .postactions {
- display: inline;
- margin-left: 8px;
- }
- .sep { color: silver; margin: 0 2px; font-size: 10px; vertical-align: middle }
- .none { color: #A9A9A9; }
- img.icon { border: none; margin-left: 3px;}
- div#noitems { color: #9099AE; }
- #fdfocusedpost { background-color: #FFE1FF; }
- a.share, span.taglist { font-size: 11px; vertical-align: middle; }
- .taglist a { color: green; text-decoration: none; }
- a.share { color: gray; text-decoration: none; }
- </style>
- </xsl:variable>
-
- <!-- folder or channel newspaper -->
- <xsl:template match="newspaper[@type='folder' or @type='channel' or @type='search' or @type='newsitemarray']">
- <html>
- <head>
- <title>Newspaper (<xsl:value-of select="title" disable-output-escaping="yes"/>)</title>
- <xsl:copy-of select="$common-head"/>
- <style type="text/css">
- div#newspapertitle {
- color: white;
- background-color: #8B008B;
- border-bottom: 1px solid #8B008B;
- font-weight: bold;
- height: 24px;
- filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#FFCCFF,endColorStr=#8B008B);
- margin-bottom: 15px;
- padding: 4px 8px;
- }
- div#container { margin: 6px 18px; }
- div.channeltitle { font-weight: bold; color: #003300; margin-top: 12px; }
- div.channeltitle a { color: #003300; text-decoration: none; }
- div.channeltitle a:hover { text-decoration: underline; }
- ul { margin-top: 6px; margin-bottom: 15px; }
- ul li { margin-bottom: 3px; }
- a.flagged { color: $COLOR-FLAGGED$; }
- </style>
- </head>
-
- <body>
- <xsl:variable name="folderId" select="@folderId"/>
-
- <div id="newspapertitle">
- <xsl:value-of select="title" disable-output-escaping="yes"/>
- </div>
-
- <div id="container">
- <xsl:if test="$item-count=0"><div id="noitems">$LANG_CONST(S_NoItemsInNewspaperFilter)$</div></xsl:if>
- <xsl:for-each select="channel">
- <xsl:sort select="title"/>
- <xsl:variable name="chanlink" select="link"/>
- <xsl:variable name="feedId" select="@feedId"/>
- <xsl:if test="$newspaper-type='folder'">
- <div class="channeltitle">
- <a href="fdaction:?action=gotofeed&feedid={$feedId}" title="$LANG_CONST(S_NewsHintGotoFeed)$"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
- <a href="fdaction:?action=gotofeedlink&newtab=1&feedid={$feedId}" title="{$lang_hint_open_new}">
- <img src="{$img_link_new}" class="icon" align="absmiddle" />
- </a>
- </div>
- </xsl:if>
- <ul>
- <xsl:for-each select="item">
- <xsl:sort select="@sortIndex" data-type="number"/>
- <xsl:variable name="postId" select="@postId"/>
- <xsl:variable name="itemlink" select="link"/>
- <li>
- <xsl:apply-templates select="."/>
- </li>
- </xsl:for-each>
- </ul>
- </xsl:for-each>
- </div>
- </body>
- </html>
- </xsl:template>
-
- <!-- single news item newspaper -->
- <xsl:template match="newspaper">
- <html>
- <head>
- <title>Newspaper</title>
- <xsl:copy-of select="$common-head"/>
- <style type="text/css">
- div.newsitemheader {
- color: white;
- background-color: #8B008B;
- border-bottom: 1px solid #8B008B;
- font-weight: bold;
- height: 100%;
- filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#FFCCFF,endColorStr=#8B008B);
- }
- div.newsitemheader, table.newsiteminfo td, div.newsitemcontent {
- padding: 6px 18px;
- }
- table.newsiteminfo {
- border-bottom: 1px solid #B2B2B2;
- background-color: #EFEFEF;
- width: 100%;
- margin-bottom: 8px;
- filter: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#EFEFEF,endColorStr=#D8D8D8);
- }
- div.newsitemheader a, table.newsiteminfo a { text-decoration: none; }
- div.newsitemheader a:hover, table.newsiteminfo a:hover { text-decoration: underline; }
- div.newsitemheader a, div.newsitemheader a:hover { color: white; }
- div.newsitemcontent { background-color: #fff; }
- div.newsitemcontent img { margin: 2px 4px; padding: 2px; border: 1px solid purple; }
- div.newsitemcontent code, div.newsitemcontent kbd, div.newsitemcontent pre { font-size: 100%;}
- div.newsitemcontent blockquote { border: 1px solid #FFCCFF; border-left-width: 6px; padding: 10px 16px; background-color: #FFF4FF}
- div.newsitemcontent blockquote blockquote { background-color: white; border-width: 1px; }
- div.newsitemcontent p { margin-top: 0; }
- </style>
- </head>
- <body>
- <xsl:apply-templates select="channel/item"/>
- </body>
- </html>
- </xsl:template>
-
- <!-- news item template -->
- <xsl:template match="item">
- <xsl:variable name="feedId" select="@feedId"/>
- <xsl:variable name="postId" select="@postId"/>
- <xsl:variable name="itemlink" select="link"/>
- <xsl:variable name="itemclass">
- <xsl:choose>
- <xsl:when test="state/@flagged!=0">flagged</xsl:when>
- <xsl:otherwise>normal</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <div class="fdnewsitem" name="{$feedId}:{$postId}">
- <div class="newsitemheader">
- <!-- use actual link for single item newspaper, otherwise link to single item newspaper -->
- <xsl:choose>
- <xsl:when test="$newspaper-type='newsitem'">
- <a id="{$postId}_title" class="{$itemclass}" href="{$itemlink}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
- </xsl:when>
- <xsl:otherwise>
- <a id="{$postId}_title" class="{$itemclass}" href="fdaction:?action=gotopost&feedid={$feedId}&postid={$postId}&markpostread=1" title="$LANG_CONST(S_NewsHintGotoPost)$"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
- $INCLUDE(postactions.inc)$
- </xsl:otherwise>
- </xsl:choose>
- </div>
-
- <!-- show content only for single item newspaper -->
- <xsl:if test="$newspaper-type='newsitem'">
- <table class="newsiteminfo" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <strong>Date: </strong><xsl:value-of select="dateDisplay"/>
- <br/>
- <xsl:if test="author">
- <strong>By: </strong><xsl:value-of select="author"/>
- <br/>
- </xsl:if>
- <xsl:if test="link">
- <strong>Link: </strong><a href="fdaction:?action=gotopostlink&newtab=0&feedid={$feedId}&postid={$postId}&markpostread=1"><xsl:value-of select="link"/></a>
- </xsl:if>
- $INCLUDE(postactions.inc)$
- </td>
- <td align="right" valign="bottom">
- <xsl:if test="enclosure">
- <xsl:variable name="enclosurelink" select="enclosure/@url"/>
- <xsl:variable name="enclosuretype" select="enclosure/@type"/>
- <a href="fdaction:?action=downloadenclosure&feedid={$feedId}&postid={$postId}&url={$enclosurelink}" title="{$enclosuretype}"><img src="{$img_enclosure}" border="0" align="absmiddle" /> Enclosure</a>
- </xsl:if>
- </td>
- </tr>
- </table>
-
- <xsl:if test="description">
- <div class="newsitemcontent">
- <xsl:value-of select="description" disable-output-escaping="yes"/>
- </div>
- </xsl:if>
- </xsl:if>
- </div>
- </xsl:template>
-
- </xsl:stylesheet>